//
//  NOPayPasswordViewController.m
//  firstpoint
//
//  Created by 泽中 on 2017/7/30.
//  Copyright © 2017年 xzcysoft. All rights reserved.
//

#import "NOPayPasswordViewController.h"
#import "BinDingTextView.h"

@interface NOPayPasswordViewController ()
{
    BinDingTextView*newmima;
    BinDingTextView*querennewmima;
}

@end

@implementation NOPayPasswordViewController
-(void)httpRequset
{
    NSString *url = [NSString stringWithFormat:@"%@%@",LINK_BASE_URL(@"/user/setPayPassword.api?access_token="),NSUD_Obj(@"token")];
    [HTTPURL postRequest:url parameters:@{@"userId":userid,@"newPayPassword":newmima.textField.text} success:^(NSURLSessionDataTask *task, id responseObject) {
        
    } filure:^(NSURLSessionDataTask *task, id error) {
        
    }];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title=@"支付密码";
    self.view.backgroundColor=LRRGBColor(235, 240, 242);
    [self setUI];
}
-(void)setUI
{
    
    newmima=[[BinDingTextView alloc]initWithFrame:CGRectMake(0, 74, width_screen, 45)];
    newmima.titleLab.text=@"新密码";
    newmima.textField.placeholder=@"要修改的新密码";
    [self.view addSubview:newmima];
    
    querennewmima=[[BinDingTextView alloc]initWithFrame:CGRectMake(0, 120, width_screen, 45)];
    querennewmima.titleLab.text=@"确认密码";
    querennewmima.textField.placeholder=@"新密码";
    [self.view addSubview:querennewmima];
    
    UIButton*button=[UIButton buttonWithType:UIButtonTypeCustom];
    button.frame=CGRectMake(10, 200, width_screen-20, 50);
    button.backgroundColor=LRRGBColor(23, 146, 211);
    button.layer.cornerRadius=4;
    [button setTitle:@"确认支付密码" forState:0];
    [button addTarget:self action:@selector(shezhiPwd) forControlEvents:64];
    [self.view addSubview:button];
    
    
}
-(void)shezhiPwd
{
    [self httpRequset];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
